package stage4;

import java.util.Scanner;

public class check8_3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个5位数");
        int a = sc.nextInt();
        if(a>9999 &&a<=99999){
            int q = a/10000;
            int w = a/1000%10;
            int e = a/10%10;
            int r = a%10;
            if(q == r && w == e){
                System.out.println("a是一个回文数");
            }
            else {
                System.out.println("a不是一个回文数");
            }
        }else {
            System.out.println("请输入正确的数字");
        }
        StringBuffer stringbuffer = new StringBuffer();
        stringbuffer.append(String.valueOf(a));
        stringbuffer.reverse();
        int b = Integer.valueOf(stringbuffer.toString());
        if(a==b){
            System.out.println("true");
        }else {
            System.out.println("false");
        }

    }
}
